﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyDay13.Models
{
    /*
      *    id    |       Name        |       Code
      *    1     |       添加        |         add
      *    2     |       删除        |         del
      *   .....
      *   
      * **/


    /// <summary>
    /// 操作表（系统中所有操作按钮）
    /// </summary>
    [Table("tb_operation")]
    public class OperationModel : BaseModel
    {
        public string Name { get; set; }
        public string Code { get; set; }
    }
    /*
     *    id    |       MenuID          |       OperationID
     *    1     |       菜单1 id        |         add id
     *    2     |       菜单1 id        |         del id
     *   .....
     *   
     * **/

    /// <summary>
    /// 菜单(页面)上面的操作按钮
    /// </summary>
    [Table("tb_menu_operation")]
    public class MenuOperationModel
    {
        [Key]
        public int ID { get; set; }
        public int MenuID { get; set; }
        public int OperationID { get; set; }
    }

    /// <summary>
    /// 角色能操作菜单上面的具体哪个按钮
    /// </summary>
    [Table("tb_rolemenu_operation")]
    public class RoleMenuOperationModel
    {
        [Key]
        public int ID { get; set; }
        public int RoleMenuID { get; set; }
        public int OperationID { get; set; }

    }
}
